package com.kws.merchant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kws.merchant.domain.OperationWorkOrder;
import com.kws.merchant.domain.po.OperationWorkDisposePo;
import com.kws.merchant.domain.po.OperationWorkOrderPo;

import java.util.List;

/**
 * 运维-工单管理(OperationWorkOrder)表服务接口
 *
 * @author yxy
 * @since 2024-10-26 12:27:15
 */
public interface OperationWorkOrderService extends IService<OperationWorkOrder> {

    /**
     * 分页查询列表
     */
    Page<OperationWorkOrder> pageList(OperationWorkOrderPo operationWorkOrderPo);

    /**
     * 工单处理
     * @return
     */
    boolean dispose(OperationWorkOrder operationWorkOrder);

    /**
     * 通过状态查询工单
     * @param status
     * @return
     */
    List<OperationWorkOrder> listByStatus(int status);

    /**
     * 新增工单
     * @param operationWorkOrder
     * @return
     */
    Object addWorkOrder(OperationWorkOrder operationWorkOrder);

    /**
     * 查询商家所有工单
     * @param companyId
     * @return
     */
    List<OperationWorkOrder> listByMerchant(Long companyId);

    OperationWorkOrder detailById(Long id);

    Double countWorkTypeBySql(Long companyId, String sql);
}
